CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(OCLINT_RULES)

SET(CMAKE_MODULE_PATH
    ${CMAKE_MODULE_PATH}
    "${CMAKE_CURRENT_SOURCE_DIR}/../oclint-core/cmake"
    )

INCLUDE(OCLintConfig)

INCLUDE_DIRECTORIES(
    ${OCLINT_SOURCE_DIR}/include
    ${OCLINT_METRICS_SOURCE_DIR}/include
    ${OCLINT_RULES_SOURCE_DIR}/include
    ${OCLINT_RULES_SOURCE_DIR}
    )
LINK_DIRECTORIES(
    ${OCLINT_BUILD_DIR}/lib
    ${OCLINT_METRICS_BUILD_DIR}/lib
    )

ADD_SUBDIRECTORY(lib)

IF(TEST_BUILD)
    INCLUDE_DIRECTORIES(${OCLINT_RULES_SOURCE_DIR}/test/headers)
    ADD_SUBDIRECTORY(test)
ELSE(TEST_BUILD)
    ADD_SUBDIRECTORY(rules)
ENDIF()
